import React from 'react';
import {QuestionCircleOutlined} from '@ant-design/icons';
import styles from './index.module.css';

interface IHelpProps {
    link: string;
}

// 帮助按钮组件
export const HelpButton: React.FC<IHelpProps> = (props: IHelpProps) => {
    const handleOpen = (): void => {
        window.open(props.link, '_blank');
    };

    return <div
        onClick={handleOpen}
        className={styles.helpButton}>
        <span><QuestionCircleOutlined/></span>
        <span className={styles.text}>查看帮助</span>
    </div>
}